<%@ page language="java" contentType="text/html; charset=UTF-8"
         isELIgnored="false" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="f"%>
<%@ taglib uri="/mytag" prefix="yjd"%>
<div class="wrap">
    <div class="h_a">商品审核列表</div>
    <form action="${requestScope.FPWEB.rootPath }/commodit/list${requestScope.FPWEB.urlStuff}" method="post" autocomplete="off" class="J_ajaxForm">
        <div class="search_type cc mb10">
            <label>商品名称：</label><input name="project_name" type="text" class="input length_3 mr10" value="${paramMap.project_name}" >
            <label>审核状态：</label>
            <select name="status" class="mr10">
                <option value="" <c:if test="${empty paramMap.status }">selected="selected"</c:if>> 全部</option>
                <option value="0" <c:if test="${!empty paramMap.status && paramMap.status == 0}">selected="selected"</c:if>>  待审核</option>
                <option value="1" <c:if test="${!empty paramMap.status && paramMap.status == 1}">selected="selected"</c:if>>  审核通过</option>
                <option value="2" <c:if test="${!empty paramMap.status && paramMap.status == 2}">selected="selected"</c:if>>  审核拒绝</option>
            </select>
            <label>类目：</label>
            <select name="category_id" class="mr10"}>
                <option value="" <c:if test="${empty paramMap.category_id }">selected="selected"</c:if>> 全部</option>
                <c:forEach items="${categorys }" var="item">
                <option ${item.id==paramMap.category_id?"selected='selected'":"" } value="${item.id }">${item.name }</option>
                </c:forEach>
            </select>
            <button type="submit" class="btn btn_submit length_1">查询</button>
        </div>
    </form>

    <form action="${requestScope.FPWEB.rootPath }/commodit/list${requestScope.FPWEB.urlStuff}" method="post" autocomplete="off" class="J_ajaxForm">
        <div class="table_list">
            <table width="100%">
                <thead>
                <tr>
                    <td>提交时间</td>
                    <td>商品名</td>
                    <td>类目</td>
                    <td>售价</td>
                    <td>期数</td>
                    <td>项目时长</td>
                    <td>操作</td>
                </tr>
                </thead>
                <tbody id="J_word_list">
                <c:forEach items="${pager.pagerModel.dataList }" var="item">
                    <tr>
                        <td>${item.strMap.submit_time}</td>
                        <td>${item.project_name}</td>
                        <td>${item.strMap.category_name}</td>
                        <td>${item.project_price}</td>
                        <td>${item.times}</td>
                        <td>${item.time_limit}</td>
                        <td>
                            <c:if test="${item.status == 0}">
                                <a class="btn btn_submit" href='<yjd:url url="/commodit/check/${item.id }"/>'>审核</a>&nbsp;&nbsp;
                                <a class="btn btn_orange" href='<yjd:url url="/commodit/edit/${item.id }"/>'>编辑</a>&nbsp;&nbsp;
                            </c:if>
                            <a class="btn btn_green" href='<yjd:url url="/commodit/detail/${item.id }"/>'>详情</a>&nbsp;&nbsp;
                        </td>
                    </tr>
                </c:forEach>
                </tbody>
            </table>
        </div>
    </form>
    <!-- 分页 -->
    <%@ include file="../public/pager/pager.pagination.jsp" %>

</div>
